package com.thiswhyme.republish.rabbitmq.core.domain;

import java.sql.Timestamp;

/**
 * 消息存储对象
 * Created by thiswhyme on 2021-03-21.
 */
public class MessageInfo {

    /**
     * 唯一标识
     */
    private Long id;

    /**
     * 消息来源类型
     * @see MessageType
     */
    private int type;

    /**
     * 通道名
     */
    private String channelName;

    /**
     * 消息UUID
     */
    private String msgId;

    /**
     * 消息头
     */
    private String headers;

    /**
     * 消息内容
     */
    private String content;

    /**
     * 消息内容类型
     */
    private String contentClassType;

    /**
     * 消息发送状态
     * @see PublishStatus
     */
    private int publishStatus;

    /**
     * 当前重试次数
     */
    private int retryTimes;

    /**
     * 创建时间
     */
    private Timestamp createTime;

    /**
     * 更新时间
     */
    private Timestamp updateTime;

    public Long getId() {
        return id;
    }

    public MessageInfo setId(Long id) {
        this.id = id;
        return this;
    }

    public int getType() {
        return type;
    }

    public MessageInfo setType(int type) {
        this.type = type;
        return this;
    }

    public String getChannelName() {
        return channelName;
    }

    public MessageInfo setChannelName(String channelName) {
        this.channelName = channelName;
        return this;
    }

    public String getMsgId() {
        return msgId;
    }

    public MessageInfo setMsgId(String msgId) {
        this.msgId = msgId;
        return this;
    }

    public String getHeaders() {
        return headers;
    }

    public MessageInfo setHeaders(String headers) {
        this.headers = headers;
        return this;
    }

    public String getContent() {
        return content;
    }

    public MessageInfo setContent(String content) {
        this.content = content;
        return this;
    }

    public String getContentClassType() {
        return contentClassType;
    }

    public MessageInfo setContentClassType(String contentClassType) {
        this.contentClassType = contentClassType;
        return this;
    }

    public int getPublishStatus() {
        return publishStatus;
    }

    public MessageInfo setPublishStatus(int publishStatus) {
        this.publishStatus = publishStatus;
        return this;
    }

    public int getRetryTimes() {
        return retryTimes;
    }

    public MessageInfo setRetryTimes(int retryTimes) {
        this.retryTimes = retryTimes;
        return this;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public MessageInfo setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
        return this;
    }

    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public MessageInfo setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
        return this;
    }
}
